package ast;

import mem.interfaces.IMem;
import environnement.interfaces.IEnv;
import ast.interfaces.IAST;
import ast.interfaces.IASTident;

public class ASTident implements IASTident{
	private String ident;

	public ASTident(String ident) {
		this.ident = ident;
	}

	public String getIdent() {
		return ident;
	}

	public void setIdent(String ident) {
		this.ident = ident;
	}

	@Override
	public Float eval(IAST ast, IEnv e, IMem m) {
		return m.getR().get(e.getR().get(getIdent()));
	}

	@Override
	public String toTreeString(String ident,IEnv env,IMem mem) {
		return getIdent();
	}
	
	
}
